/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Control;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Maury
 */
public class logoutProcessor extends Processor {

    @Override
    public void execute() throws ServletException, IOException {
        HttpSession session = getRequest().getSession(true);
        session.removeAttribute("usuario"); 
        
        RequestDispatcher rd = getRequest().getRequestDispatcher("index.jsp");
        rd.forward(getRequest(), getResponse());
    }
    
}
